{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <form action="{:request()->url()}" class="layui-form" method="post" enctype="">
            <div class="layui-form-item">
                <label class="layui-form-label">菜单名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" value="{$data.name|default=''}" autocomplete="off" placeholder="请输入名称" lay-verify="required|name" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">提示信息</label>
                <div class="layui-input-inline">
                    <input type="text" name="tips" value="{$data.tips|default=''}" autocomplete="off" placeholder="请输入提示信息" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">ICON图标</label>
                <div class="layui-input-inline">
                    <img class="layui-upload-img" id="test-upload-normal-img" src="{$data.icon|default='__AD_IMG__/upload.png'}" width="50" height="50">
                    <input type="hidden" name="icon" value="{$data.icon|default=''}" autocomplete="off" placeholder="" class="layui-input">
                    <button type="button" class="layui-btn ajax-avatar"><i class="fa fa-file-image-o"></i> 上传ICON</button>
                </div>
                <div class="layui-form-mid layui-word-aux">个人中心显示工具菜单无需上传缩略图</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">链接地址</label>
                <div class="layui-input-inline">
                    <input type="text" name="url" value="{$data.url|default=''}" autocomplete="off" placeholder="请输入链接地址" lay-verify="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否APP专有链接</label>
                <div class="layui-input-block">
                    <input type="radio" name="is_app" value="0"  title="否" checked>
                    <input type="radio" name="is_app" value="1"  title="是" {if condition="isset($data) and $data.is_app eq 1"}checked{/if}>
                </div>
                <div class="layui-form-mid layui-word-aux">是否APP链接，如果为否则不在APP显示</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">APP链接</label>
                <div class="layui-input-inline">
                    <input type="text" name="app_url" value="{$data.app_url|default=''}" autocomplete="off" placeholder="请输入APP链接地址" lay-verify="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">显示位置</label>
                <div class="layui-input-block">
                    <input type="radio" name="type" value="0"  title="首页" checked>
                    <input type="radio" name="type" value="1"  title="我的" {if condition="isset($data) and $data.type eq 1"}checked{/if}>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否服务</label>
                <div class="layui-input-block">
                    <input type="radio" name="is_server" value="0"  title="否" checked>
                    <input type="radio" name="is_server" value="1"  title="是" {if condition="isset($data) and $data.is_server eq 1"}checked{/if}>
                </div>
                <div class="layui-form-mid layui-word-aux">显示于服务专区</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-inline">
                    <input type="text" name="sort" value="{$data.sort|default=''}" autocomplete="off" placeholder="请输入排序编号" lay-verify="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="i" lay-submit="">保存</button>
                    <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
